package com.qfedu.meidijiaju.controller;

import com.qfedu.meidijiaju.entity.BxXh;
import com.qfedu.meidijiaju.entity.ResponseData;
import com.qfedu.meidijiaju.entity.SheBeiKind;
import com.qfedu.meidijiaju.service.BxXhService;
import com.qfedu.meidijiaju.service.SheBeiKindService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Api(tags = "冰箱型号查询模块接口")
@RestController
public class BxXhController {
    @Autowired
    private  BxXhService bxXhService;

    @ApiOperation("查询冰箱型号")
    @RequestMapping(value = "/BxXh/queryBxXh",method = RequestMethod.GET)
    public ResponseData<List<BxXh>> queryBxXh() {
        ResponseData<List<BxXh>> responseData = new ResponseData<>();
        List<BxXh> result = bxXhService.queryBxXh();
        int count = bxXhService.queryCount();
        if (result != null) {
            responseData.setCode(0);
            responseData.setData(result);
            responseData.setCount(count);
        }
        return responseData;
    }
}
